const { mongoose } = require('./db')

const typeSchema = new mongoose.Schema({
    name: String
})

const clothesSchema = new mongoose.Schema({
    name: String,
    price: Number,
    img: String,
    tid: {
        type: mongoose.Types.ObjectId,
        ref: 'type'
    }
})

const typeModel = new mongoose.model("type", typeSchema, "type")
const clothesModel = new mongoose.model("clothes", clothesSchema, "clothes")
module.exports = {
    typeModel, clothesModel
}